package com.briup.demo.dao;
import com.briup.demo.bean.category;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;
public interface categoryMapper {

    @Select("select * from category")
    List<category> selectAll();
    @Insert("insert into category values(null,#{name},#{introduce},#{nu},#{parent_id},#{position})")
    void insert(category category);
    @Update("update category set name=#{name},introduce=#{introduce},nu=#{nu},parent_id=#{parent_id},position=#{position} where id=#{id}")
    void update(category category);
    @Delete("delete from category where id=#{id}")
    void delete(Long id);
}
